home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 1997 April to September
/
Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso
/
products
/
bin
/
httpd
/
Solaris_2
/
dtv
< prev
next >
Wrap
Text File
|
1995-12-09
|
2KB
|
65 lines
#!./perl
#change to perl after perl5 stuff is cleared up
#
# This script will redirect the client to /channel/day or /channel/night
# depending on the time of day (according to the server).
#
#require "ctime.pl";
#
# Play with these variables to meet your needs
#
$day_path = "";
$night_path = "#night";
$start_day = 7; # Daytime starts at 7 am
$start_night = 19; # Nightime starts at 7 pm
#
# The code starts here
#
#@day = split (' ', &ctime(date) );
@day = split (' ', `date` );
#@today = split (' ', &ctime(time) );
@today = split (' ', `time` );
($hour,$min,$sec) = split(':',$today[3]);
if ($hour >= $start_night || $hour < $start_day) {
# Ok, we're in nightime
$redirpath = $night_path;
}
else {
print $file; # It's daytime
$redirpath = $day_path;
}
$file = "day$day[4].html";
print "Content-type: text/html\n\n";
print "<html><head>\n";
print "<title>Disney Channel Program Guide</title>\n";
print "</head>\n";
print "<BODY BGCOLOR=\"#173D90\" text=\"#DDDDDD\" LINK=\"#EEEEEE\" VLINK=\"#EEEE22\"ALINK=\"#FF0000\">";
print "<h1>Programming Guide</h1><p>\n";
print "<a href=\"/cgi-bin/imagemap/disney/tdc/program_guide/main.map\"><img src=\"/disney/tdc/program_guide/images/dec$day[4].gif\" ISMAP></a>\n<p><P><P>";
print "</body>\n</html>";
#open(OUT,">/opt/WWW/CERN/httpd/docs/program_guide/days/today.html");
#open(DAY,"/opt/WWW/CERN/httpd/docs/program_guide/days/$file");
#while (<DAY>) {
#print OUT $_;
#}
#close(DAY);
#close(OUT);
#print "Location: http://snl.eng\n\n";